Package MusicLandscape.util.comparators
Class MyEventAttendeesComparator
- java.lang.Object
-
- MusicLandscape.util.comparators.MyEventComparator
-
- MusicLandscape.util.comparators.MyEventAttendeesComparator
-
public class MyEventAttendeesComparator extends MyEventComparator
This class represents the concept of comparison of two events by number of attendees.- Since:
- ExerciseSheet04
- Version:
- 1
- Author:
- Jonas Altrock (ew20b126@technikum-wien.at)
-
-
Constructor Summary
Constructors Constructor Description MyEventAttendeesComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Event e1, Event e2)Compares two events by the number of attendees.
-
-
-
Method Detail
-
compare
public int compare(Event e1, Event e2)
Compares two events by the number of attendees.This comparator handles null arguments such that two null events are equal, and any null event is smaller than any non-null event.
- Specified by:
comparein classMyEventComparator- Parameters:
e1- the one event to comparee2- the other event to compare- Returns:
- a measure of the distance between e1 and e2 in the sense of the comparator
-
-